+2007-06-27 Johan Dahlin <jdahlin@async.com.br>
+
+ * gtk/gtkbuilderparser.c: Plug leaks in error code paths
+
2007-06-26 Johan Dahlin <jdahlin@async.com.br>
* tests/buildertest.c (test_object_properties):
#include "gtktypeutils.h"
#include "gtkalias.h"
-static void free_property_info (PropertyInfo *info,
- gpointer user_data);
+static void free_property_info (PropertyInfo *info);
+static void free_object_info (ObjectInfo *info);
static inline void
state_push (ParserData *data, gpointer info)
if (child_info && strcmp (child_info->tag.name, "object") == 0)
{
error_invalid_tag (data, element_name, NULL, error);
+ if (child_info)
+ free_object_info ((ObjectInfo*)child_info);
return;
}
if (!object_info || strcmp (object_info->tag.name, "object") != 0)
{
error_invalid_tag (data, element_name, "object", error);
+ if (object_info)
+ free_object_info (object_info);
return;
}
}
static void
-free_property_info (PropertyInfo *info,
- gpointer user_data)
+free_property_info (PropertyInfo *info)
{
g_free (info->data);
g_free (info->name);
if (!prop_info->data)
{
error_missing_property_value (data, error);
+ free_property_info (prop_info);
+ if (strcmp (info->tag.name, "object") == 0)
+ free_object_info((ObjectInfo*)info);
return;
}